# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Compute.V1.Model.DiskType do
  @moduledoc """
  Represents a Disk Type resource. Google Compute Engine has two Disk Type resources: * [Regional](/compute/docs/reference/rest/v1/regionDiskTypes) * [Zonal](/compute/docs/reference/rest/v1/diskTypes) You can choose from a variety of disk types based on your needs. For more information, read Storage options. The diskTypes resource represents disk types for a zonal persistent disk. For more information, read Zonal persistent disks. The regionDiskTypes resource represents disk types for a regional persistent disk. For more information, read Regional persistent disks.

  ## Attributes

  *   `creationTimestamp` (*type:* `String.t`, *default:* `nil`) - [Output Only] Creation timestamp in RFC3339 text format.
  *   `defaultDiskSizeGb` (*type:* `String.t`, *default:* `nil`) - [Output Only] Server-defined default disk size in GB.
  *   `deprecated` (*type:* `GoogleApi.Compute.V1.Model.DeprecationStatus.t`, *default:* `nil`) - [Output Only] The deprecation status associated with this disk type.
  *   `description` (*type:* `String.t`, *default:* `nil`) - [Output Only] An optional description of this resource.
  *   `id` (*type:* `String.t`, *default:* `nil`) - [Output Only] The unique identifier for the resource. This identifier is defined by the server.
  *   `kind` (*type:* `String.t`, *default:* `compute#diskType`) - [Output Only] Type of the resource. Always compute#diskType for disk types.
  *   `name` (*type:* `String.t`, *default:* `nil`) - [Output Only] Name of the resource.
  *   `region` (*type:* `String.t`, *default:* `nil`) - [Output Only] URL of the region where the disk type resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
  *   `selfLink` (*type:* `String.t`, *default:* `nil`) - [Output Only] Server-defined URL for the resource.
  *   `validDiskSize` (*type:* `String.t`, *default:* `nil`) - [Output Only] An optional textual description of the valid disk size, such as "10GB-10TB".
  *   `zone` (*type:* `String.t`, *default:* `nil`) - [Output Only] URL of the zone where the disk type resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :creationTimestamp => String.t() | nil,
          :defaultDiskSizeGb => String.t() | nil,
          :deprecated => GoogleApi.Compute.V1.Model.DeprecationStatus.t() | nil,
          :description => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :name => String.t() | nil,
          :region => String.t() | nil,
          :selfLink => String.t() | nil,
          :validDiskSize => String.t() | nil,
          :zone => String.t() | nil
        }

  field(:creationTimestamp)
  field(:defaultDiskSizeGb)
  field(:deprecated, as: GoogleApi.Compute.V1.Model.DeprecationStatus)
  field(:description)
  field(:id)
  field(:kind)
  field(:name)
  field(:region)
  field(:selfLink)
  field(:validDiskSize)
  field(:zone)
end

defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.DiskType do
  def decode(value, options) do
    GoogleApi.Compute.V1.Model.DiskType.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.DiskType do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
